<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-table.css">

    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap-table.js"></script>
    <script src="js/bootstrap-table-zh-CN.js"></script>

    <style>
        #showTable{
            width:300px;
            margin-left: 100px;
        }
    </style>
</head>
<body>
    <div>
        <button id="showBtn">点击</button>
        <button id="secondClick">二次点击</button>
        <button id="secondBtn">second button</button>
    </div>
    <script>
        function CurentTime()
        {
            var now = new Date();

            var year = now.getFullYear();       //年
            var month = now.getMonth() + 1;     //月
            var day = now.getDate();            //日

            var hh = now.getHours();            //时
            var mm = now.getMinutes();          //分

            var clock = year + "-";

            if(month < 10)
                clock += "0";

            clock += month + "-";

            if(day < 10)
                clock += "0";

            clock += day + " ";

            if(hh < 10)
                clock += "0";

            clock += hh + ":";
            if (mm < 10) clock += '0';
            clock += mm;
            return clock;
        }
        $("#showBtn").click(function () {
            var time = CurentTime;
            alert(CurentTime());
        })
    </script>
</body>
</html>